#if !defined(ximera_graphics_ogre_world_hpp)
#define ximera_graphics_ogre_world_hpp

// -----------------------------------------------------------

#include <ximera/graphics/iworld.hpp>

namespace ximera { namespace graphics { namespace ogre
{
    class GraphicsSystem;

    class XIMERA_PLUGIN_API World : public graphics::IWorld
    {
    public:
        World(GraphicsSystem* graphicsSystem);

        virtual SharedPtr<ISceneNode> const& rootNode();

        virtual void loadFromFile(String const& file);

        virtual ILight* createLight(String const& name);
        virtual ICamera* createCamera(String const& name);
        virtual IViewport* createViewport(ICamera* camera);
        virtual IEntity* createEntity(String const& name, PrefabEntityType type);
        virtual IEntity* createEntity(String const& name, String const& meshName);
        virtual IParticleSystem* createParticleSystem(String const& name, String const& templateName);

        GraphicsSystem* graphicsSystem() const { return _graphicsSystem; }

    private:
        GraphicsSystem* _graphicsSystem;
        SharedPtr<ISceneNode> _rootNode;

        void loadOSMFromFile(String const& file);
    };
}}}

// -----------------------------------------------------------

#endif